home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Ken Long / PlayRiffs-c / README < prev    next >
Encoding:
Text File  |  1994-12-04  |  2.7 KB  |  64 lines  |  [TEXT/R*ch]

  1. This is another "patchwork" but there are plenty of parts of it
  2. that I created.  I did the interface and the editing.  And if I
  3. didn't know *something* about programming it wouldn't work!
  4.  
  5. The heart of it is the Play_The_Riffs routine, linking the call
  6. backs and bumping the buffer pointers around.
  7.  
  8. I got lots of help, via IM and snippets from knowledgable
  9. programmers.  One in particular, who knows who he is.  I won't
  10. tell you who and you won't pester him.  You can pester to me,
  11. though.   : )
  12.  
  13. THINK C folks need to change the resource name for the project. 
  14. It's too big to add another for the namesake - as it is for the
  15. built application.  I wanted to reduce the sound size - and did,
  16. as much as possible - but I still wanted it to be cool, too.
  17.  
  18. Code Warrior users, don't add the resource to the project - CW
  19. will not be able to build AND copy the resource (at least mine
  20. wouldn't, as set).  Project name + .rsrc will work.
  21.  
  22. It uses two sound channels - one for the key hit sounds (creating
  23. it and getting the resource on the fly) and one for the riffs
  24. ("riff" is a musician's equivalent to a "fragment" in programming:
  25. a short passage of music).
  26.  
  27. This is also only ONE way of doing this.  You can play a series of
  28. sound from a 'for' loop, a 'while' loop, from 'if' statements,
  29. from a repeatedly called routine that just plays them with
  30. stop-gap timing included - all sorts of ways.  You can also have
  31. various numbers of sounds for your riffs, of varying lengths and
  32. played in a certain sequence under varying conditions, for a
  33. multitude of effects.
  34.  
  35. Look at Dan Sydow's animation sequencer 'for' loop.  Take out the 
  36. limiter, use Do_The_Sound instead of DrawPicture, etc.  I tried it
  37. and it worked.
  38.  
  39. The riffs are from "Are You Experienced" played backward, which is
  40. actually forward because Jimi Hendrix recorded it backwards.  It's
  41. not finely edited and you can spot the glitches.  I just wanted to
  42. make a demo - not a masterpiece - but it's not *too* shabby! You
  43. can get the idea.
  44.  
  45. "Miss Patty's" voice is from the DylanTalk source (a MacHack
  46. thing) - the "Fred's Neighbor" voices.  I just tossed that in to
  47. demonstrate a mouseDown played sound conjunction with a picture
  48. draw.  MouseUp plays another sound and puts the rectangle back
  49. like it was.
  50.  
  51. The screen area was fun to play with.  Anyone else notice "shades
  52. of *3 in Three*" in the way it acts?  Since the window is screen
  53. bounds, the 'ppat' is drawn starting at topLeft.  So any rects
  54. drawn over it will land in the right spot no matter what size
  55. screen (hopefully).
  56.  
  57. The intention, here, is to give novice programmers an avenue of
  58. approach for incorporating these "sound possibilities" in the
  59. programs they may want to create which needs such effects.
  60.  
  61. Enjoy!  (And learn.)
  62.  
  63. kenlong@netcom.com
  64.